Repository navigation
Trim leading and trailing whitespace from column names entered in the Column, Table and ERD table dialogs. #5930 - #10839
Conversation
… Column, Table and ERD table dialogs. pgadmin-org#5930 The column name field now trims the value when the user leaves it, so a stray space no longer produces a column that has to be quoted with the space in every query. Trimming happens on blur rather than on every keystroke so that names containing interior spaces can still be typed, and only after the user has edited the field, so focusing an existing column whose name genuinely has surrounding whitespace does not rename it. Closes pgadmin-org#5930
|
No actionable comments were generated in the recent review. WalkthroughThe ChangesColumn name trimming
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant User
participant InputText
participant ColumnForm
User->>InputText: Edit column name
User->>InputText: Leave field
InputText->>InputText: Trim value when enabled and edited
InputText->>ColumnForm: Report changed value
Merge Risk:
|
Summary
ColumnSchema) now trims leading and trailing whitespace when the user leaves the field, so a stray space no longer creates a column that can only be queried as" name ".trimOnBluroption incontrolPropsforInputText. It trims on blur rather than per keystroke, so names with interior spaces can still be typed, and only after the user has edited the value, so focusing an existing column whose name really does have surrounding whitespace will not rename it.Test plan
FormComponents.spec.js(trim on blur, no trim when disabled, no trim of an unedited value),column.ui.spec.js,table.ui.spec.jsCloses #5930
Summary by CodeRabbit